package com.dm.details.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dm.common.utils.DubboUtil;
import com.dm.details.mapper.DetailsMapper;

import com.dm.details.service.DetailsService;
import com.dm.module.DmItem;
import com.dm.module.DmOrder;
import com.dm.module.DmUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Service(version = DubboUtil.VERSION_1,group = DubboUtil.GROUP_NAME)
@Component
public class DetailsServiceImpl implements DetailsService {

    @Autowired
    private DetailsMapper detailsMapper;


    @Override
    public DmItem queryItemById(Long id) {
        return detailsMapper.queryItemById(id);
    }

    @Override
    public List<DmItem> queryAll() {
        return detailsMapper.queryAll();
    }

    @Override
    public DmUser queryUserById(Long id) {
        return detailsMapper.queryUserById(id);
    }

    @Override
    public void addOrder(DmOrder dmOrder) {
        detailsMapper.insert(dmOrder);
    }


}
